num_list = []
n = 1
add_num = 0
while n:
    try:
        nums = int(input('>>>'))
        num_list.append(nums)
        add_num += nums
        print('第{}次输入'.format(len(num_list)))
        print('{}平均数：{}'.format(add_num, add_num/len(num_list)))
        if nums == -1:
            n = False
    except ValueError as e:
        print(e)

